import { createRouter, createWebHistory } from "vue-router";
// import Home from '@/components/home/Home'
//
// import Main from '@/Main.vue'
//
// import EditPassage from '@/components/passage/EditPassage'
// import AddPassage from '@/components/passage/AddPassage'
// import PassageList from '@/components/passage/PassageList'
// import PassageTypeList from '@/components/passage/PassageTypeList'
//
// import EditClub from '@/components/club/EditClub'
// import AddClub from '@/components/club/AddClub'
// import ClubList from '@/components/club/ClubList'
// import ClubTypeList from '@/components/club/ClubTypeList'
//
// import EditActivity from '@/components/activity/EditActivity'
// import ActivityList from '@/components/activity/ActivityList'
// import AddActivity from '@/components/activity/AddActivity'
// import ActivityTypeList from '@/components/activity/ActivityTypeList'
//
// import AddFile from '@/components/file/AddFile'
// import EditFile from '@/components/file/EditFile'
// import FileList from '@/components/file/FileList'
// import CarouselList from '@/components/file/CarouselList'
// import HotActivities from '@/components/file/HotActivities'

// import AddUser from '@/components/user/AddUser'
// import EditUser from '@/components/user/EditUser'
// import UserList from '@/components/user/UserList'
// import Login from '@/components/user/Login'
// import UserRoleList from '@/components/user/UserRoleList'

const routes = [
  {
    path: "/",
    name: "Login",
    component: () => import("@/components/user/Login.vue"),
  },

  {
    path: "/",
    name: "Main",
    component: () => import("@/Main.vue"),
    children: [
      {
        path: "/home",
        name: "Home",
        component: () => import("@/components/home/Home.vue"),
      },
      {
        name: "EditPassage",
        path: "passages/edit.html",
        component: () => import("@/components/passage/EditPassage.vue"),
      },
      {
        name: "AddPassage",
        path: "passages/add.html",
        component: () => import("@/components/passage/AddPassage.vue"),
      },
      {
        name: "PassageList",
        path: "passages",
        component: () => import("@/components/passage/PassageList.vue"),
      },
      {
        name: "PassageTypeList",
        path: "passageTypes",
        component: () => import("@/components/passage/PassageTypeList.vue"),
      },

      {
        name: "AddClub",
        path: "clubs/add.html",
        component: () => import("@/components/club/AddClub.vue"),
      },
      {
        name: "ClubList",
        path: "clubs",
        component: () => import("@/components/club/ClubList.vue"),
      },
      {
        name: "ClubTypeList",
        path: "clubTypes",
        component: () => import("@/components/club/ClubTypeList.vue"),
      },
      {
        name: "EditClub",
        path: "clubs/edit.html",
        component: () => import("@/components/club/EditClub.vue"),
      },

      {
        path: "activities/edit.html",
        name: "EditActivity",
        component: () => import("@/components/activity/EditActivity.vue"),
      },
      {
        name: "ActivityList",
        path: "activities",
        component: () => import("@/components/activity/ActivityList.vue"),
      },
      {
        name: "ActivityTypeList",
        path: "activityTypes",
        component: () => import("@/components/activity/ActivityTypeList.vue"),
      },
      {
        path: "activities/add.html",
        name: "AddActivity",
        component: () => import("@/components/activity/AddActivity.vue"),
      },

      {
        name: "AddFile",
        path: "files/add.html",
        component: () => import("@/components/file/AddFile.vue"),
      },
      {
        name: "EditFile",
        path: "files/edit.html",
        component: () => import("@/components/file/EditFile.vue"),
      },
      {
        name: "FileList",
        path: "files",
        component: () => import("@/components/file/FileList.vue"),
      },
      {
        name: "CarouselList",
        path: "carousels",
        component: () => import("@/components/file/CarouselList.vue"),
      },
      {
        name: "HotActivities",
        path: "hotActivities",
        component: () => import("@/components/file/HotActivities.vue"),
      },

      {
        name: "AddUser",
        path: "users/add.html",
        component: () => import("@/components/user/AddUser.vue"),
      },
      {
        name: "EditUser",
        path: "users/edit.html",
        component: () => import("@/components/user/EditUser.vue"),
      },
      {
        name: "UserRoleList",
        path: "user/userRoles",
        component: () => import("@/components/user/UserRoleList.vue"),
      },
      {
        name: "UserList",
        path: "users",
        component: () => import("@/components/user/UserList.vue"),
      },
    ],
  },

  {
    path: "/:pathMatch(.*)*",
    redirect: "/",
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
